Post

Replies

Boosts

Views

Activity

Reply to Using .mixWithOthers or . duckOthers when setting category of AVAudioSession.sharedInstance gives error in WatchOS10
I've updated the code as follows and it all works fine. Interestingly even though I haven't specified to mixWithOthers, it still does. Please note that for anyone trying to find options to set on the session.activate options parameter, there aren't any! All you can use is [] if #available(watchOS 10.0, *) { try session.setCategory(AVAudioSession.Category.playback, mode: .default, policy: .longFormAudio, options: []) session.activate(options:[]){ success, error in if (error != nil) { print ("Error in activating audio session") } else { if success { print ("Audio session successfully activated") } else { print ("Audio session not activated") } } }
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’23
Reply to iOS 16.1 beta 5 AVAudioSession Error
I had a related problem - same line of AVAudioSession_iOS but with an error of "res!" - resource not avaiable. It was happening because I had already set the category on the shared instance of the AVAudioSession and called setActive(true) on it. Before iOS16 (well, watchOS9 in my case) it worked fine. Code had not changed for 2 years. Hope it helps.
Topic: Media Technologies SubTopic: Audio Tags:
Oct ’22
Reply to Using .mixWithOthers or . duckOthers when setting category of AVAudioSession.sharedInstance gives error in WatchOS10
I've updated the code as follows and it all works fine. Interestingly even though I haven't specified to mixWithOthers, it still does. Please note that for anyone trying to find options to set on the session.activate options parameter, there aren't any! All you can use is [] if #available(watchOS 10.0, *) { try session.setCategory(AVAudioSession.Category.playback, mode: .default, policy: .longFormAudio, options: []) session.activate(options:[]){ success, error in if (error != nil) { print ("Error in activating audio session") } else { if success { print ("Audio session successfully activated") } else { print ("Audio session not activated") } } }
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Using .mixWithOthers or . duckOthers when setting category of AVAudioSession.sharedInstance gives error in WatchOS10
Many thanks for the reply. So with longFormAudio, it can't now mix with other system audio, for instance Siri? This seems like a backward step. I will try and see if it mixes anyway :-) Thanks Rich
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Using .mixWithOthers or . duckOthers when setting category of AVAudioSession.sharedInstance gives error in WatchOS10
Even with the options set to [] (which does not error), when I call try AVAudioSession.sharedInstance().setActive(true) It throws another error - Error Domain=NSOSStatusErrorDomain Code=561145203 "Session activation failed". Thanks Rich
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to iOS 16.1 beta 5 AVAudioSession Error
I had a related problem - same line of AVAudioSession_iOS but with an error of "res!" - resource not avaiable. It was happening because I had already set the category on the shared instance of the AVAudioSession and called setActive(true) on it. Before iOS16 (well, watchOS9 in my case) it worked fine. Code had not changed for 2 years. Hope it helps.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to Unable to download symbols for watchOS 8.7.1 (19U67)
Had the problem with Xcode 14.0 but it seems resolved with 14.1 RC 2.
Replies
Boosts
Views
Activity
Oct ’22